home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / OS / FWMenu / Sources / FWAPulDM.cpp < prev    next >
Encoding:
Text File  |  1996-08-16  |  2.7 KB  |  76 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWAPulDM.cpp
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9. // We separate the archiving functions into their own translation units in order to
  10. // enable dead-stripping.
  11.  
  12. #include "FWOS.hpp"
  13.  
  14. #ifndef FWPULLDM_H
  15. #include "FWPullDM.h"
  16. #endif
  17.  
  18. //========================================================================================
  19. // File scope definitions
  20. //========================================================================================
  21.  
  22. #ifdef FW_BUILD_MAC
  23. #pragma segment fwmenu
  24. #endif
  25.  
  26. //========================================================================================
  27. //    class FW_CPullDownMenu
  28. //========================================================================================
  29.  
  30. const FW_ClassTypeConstant FW_LPullDownMenu = FW_TYPE_CONSTANT('p','d','m','n');
  31. FW_REGISTER_ARCHIVABLE_CLASS(FW_LPullDownMenu, FW_CPullDownMenu, FW_CPullDownMenu::Create, FW_CPullDownMenu::InitializeFromArchive, FW_CPullDownMenu::Destroy, FW_CPullDownMenu::Write)
  32.  
  33. //----------------------------------------------------------------------------------------
  34. //    FW_CPullDownMenu::Create
  35. //----------------------------------------------------------------------------------------
  36.  
  37. void* FW_CPullDownMenu::Create(FW_CReadableStream& stream, FW_ClassTypeConstant type)
  38. {
  39. FW_UNUSED(type);
  40. FW_UNUSED(stream);
  41.     return ::operator new(sizeof(FW_CPullDownMenu));
  42. }
  43.  
  44. //----------------------------------------------------------------------------------------
  45. //    FW_CPullDownMenu::InitializeFromArchive
  46. //----------------------------------------------------------------------------------------
  47.  
  48. void FW_CPullDownMenu::InitializeFromArchive(FW_CReadableStream& stream, FW_ClassTypeConstant type, void* object)
  49. {
  50. FW_UNUSED(type);
  51.     FW_SOMEnvironment ev;
  52.     new (object) FW_CPullDownMenu(ev, stream);
  53. }
  54.  
  55. //----------------------------------------------------------------------------------------
  56. //    FW_CPullDownMenu::Destroy
  57. //----------------------------------------------------------------------------------------
  58.  
  59. void    FW_CPullDownMenu::Destroy(void* object, FW_ClassTypeConstant type)
  60. {
  61. FW_UNUSED(type);
  62.     ::operator delete(object);
  63. }
  64.  
  65. //----------------------------------------------------------------------------------------
  66. //    FW_CPullDownMenu::Write
  67. //----------------------------------------------------------------------------------------
  68.  
  69. void FW_CPullDownMenu::Write(FW_CWritableStream& stream, FW_ClassTypeConstant type, const void *object)
  70. {
  71. FW_UNUSED(type);
  72.     FW_SOMEnvironment ev;
  73.     ((FW_CPullDownMenu*) object)->Flatten(ev, stream);
  74. }
  75.  
  76.